
                    
<div class="bg-light lter b-b wrapper-md">
	<div class="row">
		<div class="col-sm-6 col-xs-12">
          <h1 class="m-n font-thin h3 text-black">产品管理</h1>
        </div>
	</div>
</div>
<div class="wrapper-md" ng-controller="ProductCtrl">
	<div>
	    <a href="#/app/product/one" class="btn btn-default btn-primary">新增产品</a>
		
		<div class="pull-right">
	    	<div class="btn-group dropdown" ng-class="{'open': openplbtn}" ng-click="openplbtn = !openplbtn">
	          <button class="btn btn-default btn-info" data-toggle="dropdown">批量处理</button>
	          <ul class="dropdown-menu">
	            <li><a href ng-click="update(-1)">删除</a></li>
	            <li><a href ng-click="update(0)">待审</a></li>
	            <li><a href ng-click="update(1)">审核</a></li>
	          </ul>
	        </div>
			<ui-select class="inline" style="width: 100px;" ng-model="query.classifyId" theme="bootstrap">
		        <ui-select-match placeholder="选择分类">{{$select.selected.name}}</ui-select-match>
		        <ui-select-choices repeat="item.id as item in mappers.classifyId | filter: $select.search">
		          <span ng-bind-html="item.name"></span>
		        </ui-select-choices>
		    </ui-select>
	    	<div class="form-inline inline">
			    <div class="input-group" style="width: 150px;">
		          <input placeholder="开始时间" type="text" ng-model="model.startTime" class="form-control" datepicker-popup="yyyy-MM-dd" is-open="opened[0]" datepicker-options="dateOptions" ng-required="true" close-text="Close" />
		          <span class="input-group-btn">
		            <button type="button" class="btn btn-default" ng-click="open($event, 0)"><i class="glyphicon glyphicon-calendar"></i></button>
		          </span>
		        </div>
		        <div class="input-group" style="width: 150px;">
		          <input placeholder="截止时间" type="text" ng-model="model.endTime" class="form-control" datepicker-popup="yyyy-MM-dd" is-open="opened[1]" datepicker-options="dateOptions" ng-required="true" close-text="Close" />
		          <span class="input-group-btn">
		            <button type="button" class="btn btn-default" ng-click="open($event, 1)"><i class="glyphicon glyphicon-calendar"></i></button>
		          </span>
		        </div>
	        </div>
	        <ui-select class="inline" style="width: 80px;" ng-model="query.keywordType" theme="bootstrap">
		        <ui-select-match placeholder="选择类型">{{$select.selected.value}}</ui-select-match>
		        <ui-select-choices repeat="item.key as item in mappers.keywordType | filter: $select.search">
		          <span ng-bind-html="item.value"></span>
		        </ui-select-choices>
		    </ui-select>
		    <div class="form-inline inline" style="width: 120px;">
		    	<div class="input-group">
				   <input ng-model="query.keyword" type="text" class="form-control" placeholder="请输入搜索内容">
		    	</div>
		    </div>
		    <a href="" ng-click="submit()" class="btn btn-primary">查询</a>
	    </div>
    </div>
	
	<div style="margin-top: 20px; display: block;">
		<div class="pull-right">
		    <ui-select class="inline" style="width: 120px;" ng-model="model.l1" theme="bootstrap">
		        <ui-select-match placeholder="选择国家">{{model.l1.name}}</ui-select-match>
		        <ui-select-choices repeat="item in mappers.address | filter: $select.search">
		          <span ng-bind-html="item.name"></span>
		        </ui-select-choices>
		    </ui-select>
		    <ui-select class="inline" style="width: 120px;" ng-model="model.l2" theme="bootstrap">
		        <ui-select-match placeholder="选择省">{{model.l2.name}}</ui-select-match>
		        <ui-select-choices repeat="item in model.l1.childs | filter: $select.search">
		          <span ng-bind-html="item.name"></span>
		        </ui-select-choices>
		    </ui-select>
		    <ui-select class="inline" style="width: 120px;" ng-model="model.l3" theme="bootstrap">
		        <ui-select-match placeholder="选择市">{{model.l3.name}}</ui-select-match>
		        <ui-select-choices repeat="item in model.l2.childs | filter: $select.search">
		          <span ng-bind-html="item.name"></span>
		        </ui-select-choices>
		    </ui-select>
	    </div>
	    <div style="clear: both;"></div>
    </div>

    <div class="panel panel-default" style="margin-top: 20px;">
	    <table st-table="rowCollectionPage" st-pipe="getItems" class="table table-striped">
	      <thead>
	        <tr>
	          <th>
	          	<label class="checkbox-inline i-checks">
	              <input ng-model="checkall" ng-click="checkAll()" type="checkbox" value="1"><i></i>
	            </label>
	          </th>
	          <th>标题</th>
	          <th>分类</th>
	          <th>用户名</th>
	          <th>发布时间</th>
	          <th>审核状态</th>
	          <th>操作</th>
	        </tr>
	      </thead>
	      <tbody>
	      	<tr ng-show="rowCollectionPage.length == 0">
	      		<td colspan="7" style="padding: 50px; text-align: center;">没有找到相应的内容</td>
	      	</tr>
	        <tr ng-repeat="row in rowCollectionPage">
	          <td>
	          	<label class="checkbox-inline i-checks">
	              <input ng-model="row.checked" type="checkbox" value="1"><i></i>
	            </label>
	          </td>
	          <td><a href="http://xc.arinchina.com/HTML/productDetails.html?id={{row.id}}">{{row.productName}}</a></td>
	          <td>{{row.classifyName}}</td>
	          <td>{{row.companyName}}</td>
	          <td>{{row.publishTime}}</td>
	          <td>{{row.checkState ? '已审核' : '未审核'}}</td>
	          <td>
	          	<a href="#/app/product/one?id={{row.id}}">编辑</a>
  	          	<a href="" ng-click="del(row)">删除</a>
	          </td>
	        </tr>
	      </tbody>
	      <tfoot>
	        <tr>
	          <td colspan="7" class="text-right">
	          	<div class="inline pull-left" style="line-height: 60px">共 {{totalCount}} 条，{{pages}} 页</div>
	            <div st-pagination="" st-items-by-page="20" st-displayed-pages="7" class="no-margin inline"></div>
	          </td>
	        </tr>
	      </tfoot>
	    </table>
	  </div>
</div>
